package com.eastfair.home.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.eastfair.boot.request.PageParams;
import com.eastfair.boot.service.SuperService;
import com.eastfair.home.dto.ReportDrawingCategoryAuditHistoryDTO;
import com.eastfair.home.entity.ReportDrawingAudit;
import com.eastfair.home.entity.ReportDrawingCategoryAudit;
import com.eastfair.home.entity.ReportDrawingCategoryAuditHistory;
import com.eastfair.home.vo.ReportDrawingCategoryAuditHistoryVO;

import java.util.List;

/**
 * <p>
 * 业务接口
 * 报馆图纸分类审核记录历史
 * </p>
 *
 * @author dq
 * @date 2022 -08-08
 */
public interface ReportDrawingCategoryAuditHistoryService extends SuperService<ReportDrawingCategoryAuditHistory> {

    /**
     * 分页查询图纸分类审核历史列表.
     *
     * @param pageParams the page params
     * @return the page
     */
    Page<ReportDrawingCategoryAuditHistoryVO> listHistoryVOs(PageParams<ReportDrawingCategoryAuditHistoryDTO> pageParams);

    /**
     * 查询报馆图纸分类审核历史列表.
     *
     * @param pageParams the page params
     * @return the list
     */
    Page<ReportDrawingCategoryAuditHistory> listHistory(PageParams<ReportDrawingCategoryAuditHistoryDTO> pageParams);

    /**
     * 查询审核历史.
     *
     * @param historyDTO the history dto
     * @return the list
     */
    List<ReportDrawingCategoryAuditHistory> listHistory(ReportDrawingCategoryAuditHistoryDTO historyDTO);

    /**
     * 获取主场审核通过的最后一条历史.
     *
     * @param reportSpaceId     the report space id
     * @param drawingCategoryId the drawing category id
     * @return the last home approved history
     */
    ReportDrawingCategoryAuditHistory getLastHomeApprovedHistory(Long reportSpaceId, Long drawingCategoryId);

    /**
     * 保存报馆图纸类型审核历史.
     *
     * @param historyDTO the history dto
     * @return the boolean
     */
    boolean saveHistory(ReportDrawingCategoryAuditHistoryDTO historyDTO);

    /**
     * 批量保存报馆图纸类型审核历史.
     *
     * @param list the list
     * @return the boolean
     */
    boolean saveBatch(List<ReportDrawingCategoryAuditHistoryDTO> list);

    /**
     * 异步保存报馆图纸类型审核历史.
     *
     * @param list the list
     * @return the boolean
     */
    void asyncSaveBatch(List<ReportDrawingCategoryAuditHistoryDTO> list);

    /**
     * 图纸分类审核记录批量保存审核历史.
     *
     * @param categoryList 图纸分类审核列表
     * @param drawingList  图纸审核列表
     * @return the boolean
     */
    boolean saveBatchByReportDrawingCategoryAudit(List<ReportDrawingCategoryAudit> categoryList, List<ReportDrawingAudit> drawingList);

    /**
     * 场馆审核更新审核历史.
     *
     * @param historyDTO the history dto
     * @return the boolean
     */
    boolean updateHistoryByVenue(ReportDrawingCategoryAuditHistoryDTO historyDTO);
}
